package com.book.service;

import com.book.dao.BookMapper;
import com.book.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 落叶的思恋 on 2017/6/10.
 */
@Service("BookInfoService")
public class BookInfoServiceImp implements BookInfoService {
@Autowired
    BookMapper bookMapper;
    @Override
    public int insert(Book record) {
        return bookMapper.insert(record);
    }

    @Override
    public List<Book> select() {
        return bookMapper.select();
    }

    @Override
    public int updateByPrimaryKey(Book record) {
        return bookMapper.updateByPrimaryKey(record);
    }

    @Override
    public int delete(Integer bookId) {
        return bookMapper.delete(bookId);
    }

    @Override
    public List<Book> selectsearch(String search) {
        return bookMapper.selectsearch(search);
    }

    @Override
    public Book selectByPrimaryKey(Integer bookId) {
        return bookMapper.selectByPrimaryKey(bookId);
    }
}
